home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / asteroid.swf / scripts / __Packages / com / evilfree / astroidsRevenge / BaseCharacter.as < prev    next >
Text File  |  2010-11-09  |  19KB  |  346 lines

  1. function ┬º\x01\x02┬º()
  2. {
  3.    return 336 % 511 * 5;
  4. }
  5. var ┬º\x01┬º = -914 + "\x01\x02"();
  6. while(true)
  7. {
  8.    if(eval("\x01") != 766)
  9.    {
  10.       if(eval("\x01") != 465)
  11.       {
  12.          if(eval("\x01") != 333)
  13.          {
  14.             if(eval("\x01") != 593)
  15.             {
  16.                if(eval("\x01") == 282)
  17.                {
  18.                   set("\x01",eval("\x01") + 67);
  19.                   set(┬º┬ºpop(),function ┬º\x01\x02┬º()
  20.                   {
  21.                      return 336 % 511 * 5;
  22.                   } - 24);
  23.                   break;
  24.                }
  25.                if(eval("\x01") != 349)
  26.                {
  27.                   if(eval("\x01") != 614)
  28.                   {
  29.                      if(eval("\x01") != 340)
  30.                      {
  31.                         if(eval("\x01") != 724)
  32.                         {
  33.                            if(eval("\x01") != 17)
  34.                            {
  35.                               if(eval("\x01") != 522)
  36.                               {
  37.                                  if(eval("\x01") != 248)
  38.                                  {
  39.                                     if(eval("\x01") == 140)
  40.                                     {
  41.                                        set("\x01",eval("\x01") + 236);
  42.                                        if(!_global.com)
  43.                                        {
  44.                                           _global.com = new Object();
  45.                                        }
  46.                                        function ┬º\x01\x02┬º()
  47.                                        {
  48.                                           return 336 % 511 * 5;
  49.                                        }
  50.                                        if(!_global.com.evilfree)
  51.                                        {
  52.                                           _global.com.evilfree = new Object();
  53.                                        }
  54.                                        ┬º┬ºpop();
  55.                                        if(!_global.com.evilfree.astroidsRevenge)
  56.                                        {
  57.                                           _global.com.evilfree.astroidsRevenge = new Object();
  58.                                        }
  59.                                        ┬º┬ºpop();
  60.                                        if(!_global.com.evilfree.astroidsRevenge.BaseCharacter)
  61.                                        {
  62.                                           var _loc2_ = com.evilfree.astroidsRevenge.BaseCharacter = function(m, target_mc)
  63.                                           {
  64.                                              this.mySqrt = Math.sqrt;
  65.                                              this.mySin = Math.sin;
  66.                                              this.myCos = Math.cos;
  67.                                              this.myAtan = Math.atan2;
  68.                                              this.radian = 57.29577951308232;
  69.                                              this.boundsType = "accAway";
  70.                                              this.main = m;
  71.                                              this.place_mc(target_mc);
  72.                                              this.state = "normal";
  73.                                              this.setVariables();
  74.                                           }.prototype;
  75.                                           _loc2_.adjustVolume = function()
  76.                                           {
  77.                                           };
  78.                                           _loc2_.stopSound = function()
  79.                                           {
  80.                                           };
  81.                                           _loc2_.get_mc = function()
  82.                                           {
  83.                                              return this.my_mc;
  84.                                           };
  85.                                           _loc2_.getTargetDistance = function(myTarget)
  86.                                           {
  87.                                              var _loc2_ = this.getTargetXDistance(myTarget);
  88.                                              var _loc3_ = this.getTargetYDistance(myTarget);
  89.                                              var _loc4_ = this.mySqrt(_loc2_ * _loc2_ + _loc3_ * _loc3_);
  90.                                              return _loc4_;
  91.                                           };
  92.                                           _loc2_.accelerateToTarget = function()
  93.                                           {
  94.                                              var _loc3_ = this.targetX - this.xPos;
  95.                                              var _loc4_ = this.targetY - this.yPos;
  96.                                              var _loc2_ = this.mySqrt(_loc3_ * _loc3_ + _loc4_ * _loc4_);
  97.                                              var _loc7_ = this.myAtan(_loc4_,_loc3_) * this.radian;
  98.                                              var _loc6_ = this.myCos(_loc7_ / this.radian);
  99.                                              var _loc5_ = this.mySin(_loc7_ / this.radian);
  100.                                              if(_loc2_ > 50)
  101.                                              {
  102.                                                 this.xSpeed += _loc6_ * this.acceleration;
  103.                                                 this.ySpeed += _loc5_ * this.acceleration;
  104.                                              }
  105.                                              else
  106.                                              {
  107.                                                 this.xSpeed += _loc6_ * this.acceleration * (_loc2_ / 50);
  108.                                                 this.ySpeed += _loc5_ * this.acceleration * (_loc2_ / 50);
  109.                                              }
  110.                                           };
  111.                                           _loc2_.setTarget = function(tX, tY)
  112.                                           {
  113.                                              this.targetX = tX;
  114.                                              this.targetY = tY;
  115.                                           };
  116.                                           _loc2_.getState = function()
  117.                                           {
  118.                                              return this.state;
  119.                                           };
  120.                                           _loc2_.place_mc = function(target_mc)
  121.                                           {
  122.                                           };
  123.                                           _loc2_.setVariables = function()
  124.                                           {
  125.                                              this.xSpeed = 0;
  126.                                              this.ySpeed = 0;
  127.                                              this.acceleration = 0;
  128.                                              this.friction = 0;
  129.                                           };
  130.                                           _loc2_.setVelocity = function(xS, yS)
  131.                                           {
  132.                                              this.xSpeed = xS;
  133.                                              this.ySpeed = yS;
  134.                                           };
  135.                                           _loc2_.setPosition = function(x, y)
  136.                                           {
  137.                                              this.xPos = x;
  138.                                              this.yPos = y;
  139.                                           };
  140.                                           _loc2_.checkKeys = function()
  141.                                           {
  142.                                           };
  143.                                           _loc2_.getXPos = function()
  144.                                           {
  145.                                              return this.xPos;
  146.                                           };
  147.                                           _loc2_.getYPos = function()
  148.                                           {
  149.                                              return this.yPos;
  150.                                           };
  151.                                           _loc2_.getXSpeed = function()
  152.                                           {
  153.                                              return this.xSpeed;
  154.                                           };
  155.                                           _loc2_.getYSpeed = function()
  156.                                           {
  157.                                              return this.ySpeed;
  158.                                           };
  159.                                           _loc2_.applyFriction = function()
  160.                                           {
  161.                                              this.xSpeed *= this.friction;
  162.                                              this.ySpeed *= this.friction;
  163.                                           };
  164.                                           _loc2_.checkBounds = function()
  165.                                           {
  166.                                              if(this.boundsType == "accAway")
  167.                                              {
  168.                                                 var _loc2_ = 50;
  169.                                                 var _loc3_ = 15;
  170.                                                 if(this.xPos < _loc2_)
  171.                                                 {
  172.                                                    var _loc5_ = this.xPos;
  173.                                                    var _loc4_ = 1 - _loc5_ / _loc2_;
  174.                                                    this.xSpeed += _loc3_ * _loc4_;
  175.                                                 }
  176.                                                 if(this.xPos > this.main.getStageWidth() - _loc2_)
  177.                                                 {
  178.                                                    _loc5_ = this.main.getStageWidth() - this.xPos;
  179.                                                    _loc4_ = 1 - _loc5_ / _loc2_;
  180.                                                    this.xSpeed -= _loc3_ * _loc4_;
  181.                                                 }
  182.                                                 if(this.yPos < _loc2_)
  183.                                                 {
  184.                                                    _loc5_ = this.yPos;
  185.                                                    _loc4_ = 1 - _loc5_ / _loc2_;
  186.                                                    this.ySpeed += _loc3_ * _loc4_;
  187.                                                 }
  188.                                                 if(this.yPos > this.main.getStageHeight() - _loc2_)
  189.                                                 {
  190.                                                    _loc5_ = this.main.getStageHeight() - this.yPos;
  191.                                                    _loc4_ = 1 - _loc5_ / _loc2_;
  192.                                                    this.ySpeed -= _loc3_ * _loc4_;
  193.                                                 }
  194.                                              }
  195.                                              else if(this.boundsType == "freeform")
  196.                                              {
  197.                                                 if(this.main.getMouseDown() == false)
  198.                                                 {
  199.                                                    return undefined;
  200.                                                 }
  201.                                                 if(this.xPos - this.size / 2 > this.main.getStageWidth())
  202.                                                 {
  203.                                                    this.xPos = this.xPos - this.main.getStageWidth() - this.size;
  204.                                                 }
  205.                                                 if(this.xPos + this.size / 2 < 0)
  206.                                                 {
  207.                                                    this.xPos = this.xPos + Stage.width + this.size;
  208.                                                 }
  209.                                                 if(this.yPos - this.size / 2 > this.main.getStageHeight())
  210.                                                 {
  211.                                                    this.yPos = this.yPos - this.main.getStageHeight() - this.size;
  212.                                                 }
  213.                                                 if(this.yPos + this.size / 2 < 0)
  214.                                                 {
  215.                                                    this.yPos = this.yPos + Stage.height + this.size;
  216.                                                 }
  217.                                              }
  218.                                              else if(this.boundsType == "bounce")
  219.                                              {
  220.                                                 if(this.xPos + this.size / 2 > Stage.width)
  221.                                                 {
  222.                                                    this.xPos = Stage.width - this.size / 2;
  223.                                                    this.xSpeed = - this.xSpeed;
  224.                                                 }
  225.                                                 if(this.xPos - this.size / 2 < 0)
  226.                                                 {
  227.                                                    this.xPos = this.size / 2;
  228.                                                    this.xSpeed = - this.xSpeed;
  229.                                                 }
  230.                                                 if(this.yPos + this.size / 2 > Stage.height)
  231.                                                 {
  232.                                                    this.yPos = Stage.height - this.size / 2;
  233.                                                    this.ySpeed = - this.ySpeed;
  234.                                                 }
  235.                                                 if(this.yPos - this.size / 2 < 0)
  236.                                                 {
  237.                                                    this.yPos = this.size / 2;
  238.                                                    this.ySpeed = - this.ySpeed;
  239.                                                 }
  240.                                              }
  241.                                           };
  242.                                           _loc2_.addXSpeed = function(n)
  243.                                           {
  244.                                              this.xSpeed += n;
  245.                                           };
  246.                                           _loc2_.addYSpeed = function(n)
  247.                                           {
  248.                                              this.ySpeed += n;
  249.                                           };
  250.                                           _loc2_.destroy = function()
  251.                                           {
  252.                                              this.my_mc.removeMovieClip();
  253.                                           };
  254.                                           _loc2_.getTargetXDistance = function(bChar)
  255.                                           {
  256.                                              var _loc2_ = bChar.getXPos() - this.xPos;
  257.                                              return _loc2_;
  258.                                           };
  259.                                           _loc2_.getTargetYDistance = function(bChar)
  260.                                           {
  261.                                              var _loc2_ = bChar.getYPos() - this.yPos;
  262.                                              return _loc2_;
  263.                                           };
  264.                                           _loc2_.animate = function()
  265.                                           {
  266.                                              this.checkKeys();
  267.                                              this.checkBounds();
  268.                                              this.xPos += this.xSpeed;
  269.                                              this.yPos += this.ySpeed;
  270.                                              this.applyFriction();
  271.                                              this.my_mc._x = this.xPos;
  272.                                              this.my_mc._y = this.yPos;
  273.                                           };
  274.                                           ┬º┬ºpush(ASSetPropFlags(com.evilfree.astroidsRevenge.BaseCharacter.prototype,null,1));
  275.                                        }
  276.                                        ┬º┬ºpop();
  277.                                        break;
  278.                                     }
  279.                                     if(eval("\x01") == 376)
  280.                                     {
  281.                                        set("\x01",eval("\x01") - 376);
  282.                                        break;
  283.                                     }
  284.                                  }
  285.                                  set("\x01",eval("\x01") - 108);
  286.                                  continue;
  287.                               }
  288.                               set("\x01",eval("\x01") - 274);
  289.                               if(function ┬º\x01\x02┬º()
  290.                               {
  291.                                  return 336 % 511 * 5;
  292.                               })
  293.                               {
  294.                                  set("\x01",eval("\x01") - 108);
  295.                               }
  296.                            }
  297.                            set("\x01",eval("\x01") + 505);
  298.                            ┬º┬ºpush(!function ┬º\x01\x02┬º()
  299.                            {
  300.                               return 336 % 511 * 5;
  301.                            });
  302.                            continue;
  303.                         }
  304.                         set("\x01",eval("\x01") - 707);
  305.                         ┬º┬ºpush(eval(function ┬º\x01\x02┬º()
  306.                         {
  307.                            return 336 % 511 * 5;
  308.                         }));
  309.                         continue;
  310.                      }
  311.                      set("\x01",eval("\x01") - 7);
  312.                      var ┬º┬ºpop() = function ┬º\x01\x02┬º()
  313.                      {
  314.                         return 336 % 511 * 5;
  315.                      };
  316.                      continue;
  317.                   }
  318.                   set("\x01",eval("\x01") - 274);
  319.                   ┬º┬ºpush("\x0f");
  320.                   ┬º┬ºpush(1);
  321.                }
  322.                set("\x01",eval("\x01") + 265);
  323.                continue;
  324.             }
  325.             set("\x01",eval("\x01") + 21);
  326.             continue;
  327.             continue;
  328.          }
  329.          set("\x01",eval("\x01") + 391);
  330.          ┬º┬ºpush("\x0f");
  331.          continue;
  332.       }
  333.       set("\x01",eval("\x01") - 183);
  334.       if(function ┬º\x01\x02┬º()
  335.       {
  336.          return 336 % 511 * 5;
  337.       })
  338.       {
  339.          set("\x01",eval("\x01") + 67);
  340.       }
  341.       continue;
  342.    }
  343.    set("\x01",eval("\x01") - 301);
  344.    ┬º┬ºpush(true);
  345. }
  346.